﻿/**
 * Reboulder - Partial Boulder Dash clone
 * Jesús Sagra, 2014
 * 
 * Reboulder: main class
 * 
 * Version    Date     Changes
 * ---------------------------------------------------------------------------
 *  0.01   06-mar-2015 Initial version, draw player. Move player.            
 *  0.02   06-mar-2015 Draw level. Check background collisions.              
 *  0.03   06-mar-2015 Draw items. Draw rocks.                               
 *  0.04   06-mar-2015 IntroScreen. Start/Exit game.                         
 *  0.05   06-mar-2015 Draw or hide sand. Pick item gives points.            
 *  0.06   06-mar-2015 Score bar. Player death.                              
 *  0.07   06-mar-2015 HiScoreScreen and management highest scores.          
 *  0.08   06-mar-2015 Map loader from files.                                
 *  0.09   06-mar-2015 Beta Rock Gravity.                                    
 *  0.10   06-mar-2015 Improved rocks' gravity and collisions. 
 *  0.11   06-mar-2015 Jesus Sagra
 *                     CreditsScreen
 *                      
 * ---------------------------------------------------------------------------		
 */

class Reboulder
{
    private IntroScreen intro;
    private Game game;
    private HiScoresScreen hiScores;
    private CreditsScreen credits;


    public Reboulder()
    {
        bool fullScreen = false;
        SdlHardware.Init(1024, 768, 24, fullScreen);

        intro = new IntroScreen();
        hiScores = new HiScoresScreen();
        credits = new CreditsScreen();
    }

    static void Main()
    {        
        Reboulder theGame = new Reboulder();
        theGame.Run();
    }


    //Main game´s loop
    void Run()
    {
        while (true)
        {        
            intro.Draw();
            game = new Game();
            game.Run();
            hiScores.Draw();
            credits.Draw();
        }
    }
}